package com.fsnbigdata.service.api;
import com.fsnbigdata.domain.EndangeredSpecies;
import com.fsnbigdata.domain.Park;
import com.fsnbigdata.domain.dto.NamingPair;

import com.fsnbigdata.vo.ParkVo;
import com.querydsl.core.types.Predicate;
import org.springframework.roo.addon.layers.service.annotations.RooService;
import com.fsnbigdata.domain.ParkDistrict;
import io.springlets.data.domain.GlobalSearch;
import io.springlets.format.EntityResolver;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * = ParkService
 *
 * TODO Auto-generated class documentation
 *
 */
@RooService(entity = Park.class)
public interface ParkService extends EntityResolver<Park, Long> {

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Park
     */
    public abstract Park findOne(Long id);

    /**
     * TODO Auto-generated method documentation
     *
     * @param park
     */
    public abstract void delete(Park park);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entities
     * @return List
     */
    public abstract List<Park> save(Iterable<Park> entities);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     */
    public abstract void delete(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entity
     * @return Park
     */
    public abstract Park save(Park entity);

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Park
     */
    public abstract Park findOneForUpdate(Long id);

    /**
     *
     * @param predicate
     * @param pageable
     * @return
     */
    public abstract Page<Park> search(Predicate predicate, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @return List
     */
    public abstract List<Park> findAll(Iterable<Long> ids);

    /**
     *
     * @param pageable
     * @return List
     */
    public abstract Page<Park> findAll(Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @return List
     */
    public abstract List<Park> findAll();

    /**
     * TODO Auto-generated method documentation
     *
     * @return Long
     */
    public abstract long count();

    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Park> findAll(GlobalSearch globalSearch, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Park> findAll(GlobalSearch globalSearch, Pageable pageable, String creator);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Park> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param park
     * @param districtsToAdd
     * @return Park
     */
    public abstract Park addToDistricts(Park park, Iterable<ParkDistrict> districtsToAdd);

    /**
     * TODO Auto-generated method documentation
     *
     * @param park
     * @param districtsToRemove
     * @return Park
     */
    public abstract Park removeFromDistricts(Park park, Iterable<Long> districtsToRemove);

    List<NamingPair> findAllByInitial(String initial);

    List<List<Park>> findAllByType();

    List<Park> findAllByType(Integer type);

    List findByPageAndSize(String type,String creator,String name, Pageable pageable);//分页查询
}
